﻿using Wicresoft.Task.ARNotice;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System;
using Wicresoft.Task.Common;

namespace ARSys.Test
{
    
    
    /// <summary>
    ///This is a test class for ARSysEmailTest and is intended
    ///to contain all ARSysEmailTest Unit Tests
    ///</summary>
    [TestClass()]
    public class ARSysEmailTest
    {
        public ARSysEmailTest()
        {
            Environment.CurrentDirectory = @"D:\Users\documents\visual studio 2010\Projects\ARSys.EmailService\Debug";

        }

        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


        /// <summary>
        ///A test for Execute
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Wicresoft.Task.ARNotice.dll")]
        public void ExecuteTest()
        {
            ARSysEmail_Accessor target = new ARSysEmail_Accessor(); // TODO: Initialize to an appropriate value
           
            IntervalTask task = target.Target as IntervalTask;
            task.Bag = new System.Dynamic.ExpandoObject();
            task.Bag.MailFrom = @"noreply@evm.local";
            task.Bag.Bcc = "yunzhe.chen@alcatel-sbell.com.cn";
            task.Bag.BaseUrl = "http://vs31srm01:8080/arsys/";
            task.Bag.MyVMUrl = "http://vs31srm01:8080/arsys/forms/vs31srm01/ASB_MyvApp/Default+Administrator+View/";
            task.Bag.MyActivityUrl = "http://vs31srm01:8080/arsys/forms/vs31srm01/ASB_MyvApp/Default+Administrator+View/";
           
            target.Execute();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
